﻿/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2023/12/9
 * 时间: 21:10
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.Collections.Generic;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;

using System.Linq;
//using System.Windows.Forms;
using ACAD = Autodesk.AutoCAD.ApplicationServices;
using System.Runtime.InteropServices;

using System.IO;

namespace modifyTkInfos
{
	/// <summary>
	/// Description of MyClass.
	/// </summary>
	public class MyClass
	{
		[CommandMethod("mptry")]
		public static void Any_PlotBySelect()
		{

			Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

			Database acDb = acDoc.Database;

			Editor acEd = acDoc.Editor;
			
			for (int i = 0; i < 10; i++) {
				
				acEd.WriteMessage("试验命令");
			}
			
			string folderIn=@"C:\Temp\IN";
			
			DirectoryInfo  di=new DirectoryInfo(folderIn);
			
			foreach (var element in di.GetFiles()) {
				
				acEd.WriteMessage(element.FullName);
				
			}
			
		}

        [CommandMethod("gks")]
        public static void Modify_Time()
        {

            Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;

            Database acDb = acDoc.Database;

            Editor acEd = acDoc.Editor;

            ModifyTkInfoForm modifyTkInfoForm = new ModifyTkInfoForm();

            modifyTkInfoForm.Show();
            
        }
        
    }
}